import request from '@/utils/request/index.js'
// 立即预约
export function apiToBooking(data) {
	return request.request({
		url: '/api/store/v1/appointment/add',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}


// 修改用户预约状态
export function UpdateAppointmentStatus(data) {
	return request.request({
		url: '/api/store/v1/appointment/update/status',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}

// 查看用户预约列表
export function bookingList(data) {
	return request.request({
		url: '/api/store/v1/appointment/list',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}

// 查看用户预约订单详情
export function bookingOrderDetail(data) {
	return request.request({
		url: '/api/store/v1/appointment/detail',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}

// 查看用户最近预约的一个订单
export function sinceBookingOrder(data) {
	return request.request({
		url: '/api/store/v1/appointment/newest',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}

// 商家获取用户评价
export function GetUserComment(data) {
	return request.request({
		url: '/api/store/v1/appointment/conment/list',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}

// 查看用户预约订单详情
export function StoreWriteOff(data) {
	return request.request({
		url: '/api/store/v1/appointment/scan',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}

// 用户提交订单评论
export function SumbitComment(data) {
	return request.request({
		url: '/api/store/v1/appointment/comment/add',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}

// 用户购买会员
export function BuyVip(data) {
	return request.request({
		url: '/api/order/v1/vip/buy',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}


// 用户取消会员
export function CancelVip(data) {
	return request.request({
		url: '/api/order/v1/vip/cancel',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}